//
//  AutoHeight.m
//  Fragrance
//
//  Created by yinzhongyuan on 15/5/28.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "AutoHeight.h"

@implementation AutoHeight

+(CGFloat)getLabelHight:(CGFloat)howBig :(CGFloat)labelWidth :(NSString *)str
{
    CGSize size = CGSizeMake(labelWidth, 1000);
    NSDictionary *dic = [NSDictionary dictionaryWithObject:[UIFont systemFontOfSize:howBig] forKey:NSFontAttributeName];
    CGRect frame = [str boundingRectWithSize:size options:NSStringDrawingUsesLineFragmentOrigin attributes:dic context:nil];
    return frame.size.height;
    
}


@end
